<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui">

<h:head>
	<title>Agenda JSF</title>
</h:head>

<h:body>
	<h:outputStylesheet library="css" name="style.css" />
	<div id="header">
		<h1>Cadastro</h1>

		<div style="clear: both"></div>
	</div>

	<div id="conteudo">
		<h:form>
			<p:growl id="growl" showDetail="false" sticky="false" life="5000" />
			<p:fieldset>
				<h:outputLabel value="Cadastro" />
				<br />
				<h:panelGrid columns="2">
					<h:outputLabel value="Nome: *" />
					<p:inputText value="#{usuarioBean.usuario.nome}" required="true"
						requiredMessage="O nome eh obrigatorio!" />
					<h:outputLabel value="Email: *" />
					<p:inputText value="#{usuarioBean.usuario.email}" required="true"
						requiredMessage="O email eh obrigatorio!" />
					<h:outputLabel value="Senha: *" />
					<p:password id="pwd" value="#{usuarioBean.usuario.senha}"
						required="true" match="rpt" feedback="true" goodLabel="Boa"
						weakLabel="Fraca" strongLabel="Forte"
						promptLabel="Insira uma senha"
						requiredMessage="A senha eh obrigatoria!" />
					<h:outputLabel value="Repita a Senha: *" />
					<p:password id="rpt" value="#{usuarioBean.usuario.senha}"
						required="true" requiredMessage="Repita a senha corretamente!" />
				</h:panelGrid>
				<p:commandButton value="Cadastrar"
					actionListener="#{usuarioBean.adiciona}" update="growl" action="index"/>
			</p:fieldset>
		</h:form>
	</div>

	<div id="footer">
		<hr />
		&copy; 2012 Agenda JSF. Desenvolvimento: <a
			href="http://www.linkedin.com/pub/lucas-marques-da-silva/24/431/489"
			target="blank">Lucas Marques</a>
	</div>
</h:body>
</html>